package com.example.worldcupsever.fragment;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.example.worldcupsever.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class ZixunFragment extends Fragment {
    TextView wz;
    public ZixunFragment() {
        // Required empty public constructor
    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        //activity_aboutus_fargment为fragment当前布局
        View view = inflater.inflate(R.layout.fragment_zixun, container, false);
        //绑定TextView的ID
        wz=(TextView)view.findViewById(R.id.btn_wz);
        //设置监听
        wz.setOnClickListener(new View.OnClickListener() {            @Override
            public void onClick(View v) {
                Uri uri = Uri.parse("https://www.1272.cn/q/282942537_123753.shtml");
                Intent intent = new Intent(Intent.ACTION_VIEW,uri);
                startActivity(intent);
            }
        });
        return view;
    }
    }